#!/usr/bin/python
# -*- coding: utf-8 -*-
# ########################################################################
# # This scaffolding model makes your app work on Google App Engine too
# ########################################################################
from datetime import datetime,timedelta
now = datetime.utcnow() + timedelta(hours=+8)
try:
    from gluon.contrib.gql import *  # if running on Google App Engine
except:
    db = SQLDB('postgres://root:root@localhost:5432/testdb')  # if not, use SQLite or other DB
else:
    db = GQLDB()  # connect to Google BigTable
    session.connect(request, response, db=db)  # and store sessions there

db.define_table('message',
        SQLField('postfrom','string',required=True,default='匿名'),
        SQLField('content','text',default=''),
        SQLField('posttime','datetime',default=now))
